<div class="modal-header">
    <h4 class="modal-title">{{::title}}</h4>
</div>
<div class="modal-body">
<form class="form-horizontal" name="configform" ng-submit="configform.$valid&&ok()">
    <div class="form-group">
        <label class="control-label col-sm-2">配置文件名</label>
         <div class="col-sm-8">
             <input name="name" type="text" class="form-control" ng-model="formDatas.configName" ng-disabled="confignameDia" required>

         </div>
    </div>
    <div class="form-group" ng-class="{'has-error':(configform.version.$touched||configform.$sumitted)&&(configform.version.$error.required||hasVer)}">
        <label  class="control-label col-sm-2">版本号</label>
         <div class="col-sm-8">
             <div class="loading-sm text-loading" ng-show="verLoading"></div>
             <input name="version" type="text" class="form-control" ng-model="formDatas.configVersion" ng-blur="checkVer()" required>
             <div class="text-danger" ng-show="hasVer">此版本已存在</div>
         </div>
    </div>
   
    <div class="form-group panel margin-bottom-0">
        <label class="control-label col-sm-2 margin-top-20">属性</label>
        <div class="col-sm-8 panel-body">
            <table class="table table-inline-edit">
                <thead>
                <tr>
                    <th>key</th>
                    <th>value</th>
                    <th>备注</th>
                    <th style="width:60px;"></th>
                </tr>
                </thead>
                <tbody>
                    <tr ng-repeat="item in formDatas.config">
                        <td ng-class="{'has-error':(configform['key'+$index].$touched||configform.$sumitted)&&(configform['key'+$index].$error.pattern||configform['key'+$index].$error.required)}">
                            <input type="text" ng-pattern="/^[\w\d-.]+$/" ng-model="item.key" name="{{'key'+$index}}" required>
                        </td>
                        <td ng-class="{'has-error':(configform['value'+$index].$touched||configform.$sumitted)&&(configform['value'+$index].$error.required)}">
                            <input type="text" ng-model="item.value" name="{{'vlaue'+$index}}" required>
                        </td>
                        <td>
                            <input type="text" ng-model="item.remark" name="{{'remark'+$index}}">
                        </td>
                        <td class="text-center"><a ng-hide="$index==0" title="删除" ng-click="deleteRow($index)"><i class="fa fa-trash fa-lg"/></a></td>
                    </tr>
                    <tr>
                    <td colspan="4">
                        <a ng-click="addRow()">+ 添加属性</a>
                    </td>
                </tr>
                </tbody>
            </table>
        </div>
    </div>
    <div class="text-right padding-top-15 padding-right-20">
    <button class="btn btn-primary" type="submit">确定</button>
    <button class="btn btn-default margin-left-10" type="button" ng-click="cancel()">取消</button>
</div>
</form>
</div>

